package com.hc.controller;

import com.hc.model.IncubModel;
import com.hc.service.IIncubatormvService;
import com.hc.service.QcEquipmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/incub")
@Api(description = "培养箱返回数据")
public class IncubController {

    @Autowired
    private IIncubatormvService iIncubatormvService;

    @Autowired
    private QcEquipmentService qcEquipmentService;



    @GetMapping("/selectIncubmonth")
    Map<String,List<IncubModel>> selectIncubmonth(String equipment_no ,String startdate ,String enddate){
        Map<String, List<IncubModel>> incubatormvs = iIncubatormvService.selectIncubmonth(equipment_no, startdate, enddate);
        return incubatormvs;
    }


    @ApiOperation("获取培养箱当月人员巡检记录")
    @GetMapping("/feacheqtype")
    public Map<String,String> feacheqtype(String day){
        return  qcEquipmentService.feacheqtype(day);
    };

    @ApiOperation("获取设备类型当月人员巡检记录")
    @GetMapping("/feacheqtypeClass")
    public Map<String, Map<String,String>> feacheqtypeClass(String day, String classId){
        return  qcEquipmentService.feacheqtypeClass(day,classId);
    };


    @ApiOperation("补单个培养箱当天数据")
    @GetMapping("/getIncBydayData")
    public void  getIncBydayData(String day,String eqNo){
        iIncubatormvService.getIncBydayData(day,eqNo);
    }

}
